package com.javafactroy.kunlong.data.service;

import com.javafactroy.kunlong.base.dto.TQueryParam;
import com.javafactroy.kunlong.base.model.ReturnPageInfo;
import com.javafactroy.kunlong.data.dao.mysql.SysAmapApiMapper;
import com.javafactroy.kunlong.data.entity.SysAmapApiEntity;

import com.javafactroy.kunlong.data.iface.IGenericParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

/**
 * @author raymond.lei@163.com
 * @date 2023-11-26 22:32:19
 */
@Slf4j
@Service
public class SysAmapService extends GeneralService<SysAmapApiEntity, SysAmapApiMapper> {

    public static class SysAmapApiEntityGenricParam implements IGenericParam<SysAmapApiEntity> {

        @Override
        public SysAmapApiEntity getParam() {
            return new SysAmapApiEntity();
        }
    }
    public SysAmapService() {
        genricParam = () -> new SysAmapApiEntity();
      // genricParam = genericParamFactroy.find("GenericParamMysqlColumns").getParam();

    }

    public ReturnPageInfo<SysAmapApiEntity> queryParam(@Param("queryParam") TQueryParam<SysAmapApiEntity> queryParam) {
        if ( queryParam.getParam() == null ) {
            queryParam.setParam(new SysAmapApiEntity());
        }

        return super.queryParam(queryParam);//queryParam.toParam());

    }
}
